#!/usr/bin/python
#Filename:objvar.py

class Person:
    '''Represents a person.'''
    population = 0

    def __init__(self, name):
        '''Initializes the person's data.'''
        self.name = name
        print "(Initializing %s)" % self.name

        Person.population += 1

    def __del__(self):
        '''I am dying.'''
        print "%s says bye." % self.name

        Person.population -= 1

        if Person.population == 0:
            print "I am the last one."
        else:
            print "There are still %d pepole left." % Person.population

    def sayhi(self):
        '''Greeting by the person.

        Really, that's all it does.'''
        print "Hi, my name is %s." % self.name

    def howmany(self):
        '''Prints the current population.'''
        if Person.population == 1:
            print "I am the only person here."
        else:
            print "We have %d person here." % Person.population

aaaaaa = Person("Dp")
aaaaaa.sayhi()
aaaaaa.howmany()

kalam = Person("Abdul Kalam")
kalam.sayhi()
kalam.howmany()

aaaaaa.sayhi()
aaaaaa.howmany()

